/**********************************************************************************************************************
* COPYRIGHT 
* ------------------------------------------------------------------------------------------------------------------- 
* Copyright (c) iSOFT INFRASTRUCTURE SOFTWARE CO., LTD. This software is proprietary to 
* iSOFT INFRASTRUCTURE SOFTWARE CO., LTD., and all rights are reserved by iSOFT INFRASTRUCTURE SOFTWARE CO., LTD. 
* Without the express written permission of the company, no organization or individual may copy, install, trial, 
* distribute, or reverse engineer this software. For terms of use and further details, please refer to the End User 
* License Agreement (EULA) or contact us business@i-soft.com.cn for more assistance. 
* 
* This file contains code from EasyXMen, which is licensed under the LGPL-2.1. However, due to a special exception, 
* you are not required to comply with the provisions of section 6a of LGPL-2.1. Specifically, you may distribute 
* your software, including this file, under terms of your choice, including proprietary licenses, without needing to 
* provide the source code or object code as specified in section 6a. For more details, please refer to the project's 
* LICENSE and EXCEPTION files and the specific exception statement.  
* ------------------------------------------------------------------------------------------------------------------- 
* FILE DESCRIPTION 
* ------------------------------------------------------------------------------------------------------------------- 
*  @MCU                : TC397 
*  @file               : Csm_Cfg.c 
*  @license            : Evaliation 
*  @licenseExpiryDate  :  
*  @date               : 2024-11-27 16:15:27 
*  @customer           : EasyXMen User 
*  @toolVersion        : 2.0.18 
*********************************************************************************************************************/ 
/*******************************************************************************
**                      Includes                                              **
*******************************************************************************/
//#include "SecOc.h"
//#include "Crypto_test.h"
#include "Csm_Internal.h"
/*******************************************************************************
**                      Private Variable Definitions                          **
*******************************************************************************/

#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
static CONST(Crypto_PrimitiveInfoType, CSM_CONST) Csm_DecryptPrimInfo_0 =
{
    0U,                           /*resultLength*/
    CRYPTO_DECRYPT,                   /*service*/
    {                               /*algorithm*/
        CRYPTO_ALGOFAM_SM2,       /*family*/
        CRYPTO_ALGOFAM_NOT_SET,       /*secondaryFamily*/
        64U,                       /*keyLength*/
        CRYPTO_ALGOMODE_NOT_SET,   /*mode*/
    },
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"

#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
static CONST(Crypto_PrimitiveInfoType, CSM_CONST) Csm_EncryptPrimInfo_0 =
{
    0U,                           /*resultLength*/
    CRYPTO_ENCRYPT,                   /*service*/
    {                               /*algorithm*/
        CRYPTO_ALGOFAM_SM2,       /*family*/
        CRYPTO_ALGOFAM_NOT_SET,       /*secondaryFamily*/
        64U,                       /*keyLength*/
        CRYPTO_ALGOMODE_NOT_SET,   /*mode*/
    },
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"

#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
static CONST(Crypto_PrimitiveInfoType, CSM_CONST) Csm_HashPrimInfo_0 =
{
    32U,                           /*resultLength*/
    CRYPTO_HASH,                   /*service*/
    {                               /*algorithm*/
        CRYPTO_ALGOFAM_SHA2_256,       /*family*/
        CRYPTO_ALGOFAM_NOT_SET,       /*secondaryFamily*/

        0U,/*keyLength*/
        CRYPTO_ALGOMODE_NOT_SET,   /*mode*/
    },
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
static CONST(Crypto_PrimitiveInfoType, CSM_CONST) Csm_MacGeneratePrimInfo_0 =
{
    16U,                           /*resultLength*/
    CRYPTO_MACGENERATE,                   /*service*/
    {                               /*algorithm*/
        CRYPTO_ALGOFAM_AES,       /*family*/
        CRYPTO_ALGOFAM_NOT_SET,       /*secondaryFamily*/
        16U,                       /*keyLength*/
        CRYPTO_ALGOMODE_CMAC,   /*mode*/
    },
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"

#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
static CONST(Crypto_PrimitiveInfoType, CSM_CONST) Csm_MacVerifyPrimInfo_0 =
{
    0U,                           /*resultLength*/
    CRYPTO_MACVERIFY,                   /*service*/
    {                               /*algorithm*/
        CRYPTO_ALGOFAM_AES,       /*family*/
        CRYPTO_ALGOFAM_NOT_SET,       /*secondaryFamily*/
        16U,                       /*keyLength*/
        CRYPTO_ALGOMODE_CMAC,   /*mode*/
    },
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
static CONST(Crypto_PrimitiveInfoType, CSM_CONST) Csm_RandomGeneratePrimInfo_0 =
{
    16U,                           /*resultLength*/
    CRYPTO_RANDOMGENERATE,                   /*service*/
    {                               /*algorithm*/
        CRYPTO_ALGOFAM_RNG,       /*family*/
        CRYPTO_ALGOFAM_NOT_SET,       /*secondaryFamily*/
        128U,                       /*keyLength*/
        CRYPTO_ALGOMODE_CTRDRBG,   /*mode*/
    },
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
static CONST(Crypto_PrimitiveInfoType, CSM_CONST) Csm_SignatureGeneratePrimInfo_0 =
{
    64U,    /*resultLength*/
    CRYPTO_SIGNATUREGENERATE,                   /*service*/
    {                               /*algorithm*/
        CRYPTO_ALGOFAM_SM2,       /*family*/
        CRYPTO_ALGOFAM_NOT_SET,       /*secondaryFamily*/
        64U,                       /*keyLength*/
        CRYPTO_ALGOMODE_NOT_SET,   /*mode*/
    },
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
static CONST(Crypto_PrimitiveInfoType, CSM_CONST) Csm_SignatureVerifyPrimInfo_0 =
{
    0U,                           /*resultLength*/
    CRYPTO_SIGNATUREVERIFY,                   /*service*/
    {                               /*algorithm*/
        CRYPTO_ALGOFAM_SM2,       /*family*/
        CRYPTO_ALGOFAM_NOT_SET,       /*secondaryFamily*/
        64U,                       /*keyLength*/
        CRYPTO_ALGOMODE_NOT_SET,   /*mode*/
    },
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"

#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
static CONST(Crypto_JobPrimitiveInfoType, CSM_CONST) Csm_JobPrimitiveInfo[CSM_JOB_NUM] =
{
    {

        CSM_INVALID_CBKID,/*callbackId*/
        &Csm_HashPrimInfo_0, /*primitiveInfo*/
        0U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_SYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
    {

        0U,/*callbackId*/
        &Csm_HashPrimInfo_0, /*primitiveInfo*/
        0U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_ASYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
    {

        4U,/*callbackId*/
        &Csm_EncryptPrimInfo_0, /*primitiveInfo*/
        0U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_ASYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
    {

        5U,/*callbackId*/
        &Csm_DecryptPrimInfo_0, /*primitiveInfo*/
        0U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_ASYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
    {

        1U,/*callbackId*/
        &Csm_MacGeneratePrimInfo_0, /*primitiveInfo*/
        1U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_ASYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
    {

        2U,/*callbackId*/
        &Csm_MacVerifyPrimInfo_0, /*primitiveInfo*/
        1U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_ASYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
    {

        3U,/*callbackId*/
        &Csm_RandomGeneratePrimInfo_0, /*primitiveInfo*/
        2U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_ASYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
    {

        CSM_INVALID_CBKID,/*callbackId*/
        &Csm_EncryptPrimInfo_0, /*primitiveInfo*/
        0U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_SYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
    {

        CSM_INVALID_CBKID,/*callbackId*/
        &Csm_DecryptPrimInfo_0, /*primitiveInfo*/
        0U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_SYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
    {

        CSM_INVALID_CBKID,/*callbackId*/
        &Csm_MacGeneratePrimInfo_0, /*primitiveInfo*/
        1U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_SYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
    {

        CSM_INVALID_CBKID,/*callbackId*/
        &Csm_MacVerifyPrimInfo_0, /*primitiveInfo*/
        1U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_SYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
    {

        CSM_INVALID_CBKID,/*callbackId*/
        &Csm_RandomGeneratePrimInfo_0, /*primitiveInfo*/
        2U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_SYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
    {

        CSM_INVALID_CBKID,/*callbackId*/
        &Csm_SignatureGeneratePrimInfo_0, /*primitiveInfo*/
        0U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_SYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
    {

        CSM_INVALID_CBKID,/*callbackId*/
        &Csm_SignatureVerifyPrimInfo_0, /*primitiveInfo*/
        0U,  /*cryIfKeyId*/
        CRYPTO_PROCESSING_SYNC,  /*processingType*/
        FALSE, /*callbackUpdateNotification*/
    },
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"

#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
static CONST(Crypto_JobInfoType, CSM_CONST) Csm_JobInfo[CSM_JOB_NUM] =
{
    {
        CsmJob_HashSyn,        /*jobId*/
        1U,                /*jobPriority*/
    },
    {
        CsmJob_HashASyn,        /*jobId*/
        1U,                /*jobPriority*/
    },
    {
        CsmJob_EncryptAsyn,        /*jobId*/
        1U,                /*jobPriority*/
    },
    {
        CsmJob_DecryptAsyn,        /*jobId*/
        1U,                /*jobPriority*/
    },
    {
        CsmJob_MacGenAsyn,        /*jobId*/
        2U,                /*jobPriority*/
    },
    {
        CsmJob_MacVerifyAsyn,        /*jobId*/
        2U,                /*jobPriority*/
    },
    {
        CsmJob_RandomAsyn,        /*jobId*/
        2U,                /*jobPriority*/
    },
    {
        CsmJob_EncryptSyn,        /*jobId*/
        2U,                /*jobPriority*/
    },
    {
        CsmJob_DecryptSyn,        /*jobId*/
        2U,                /*jobPriority*/
    },
    {
        CsmJob_MacGenSyn,        /*jobId*/
        2U,                /*jobPriority*/
    },
    {
        CsmJob_MacVerifySyn,        /*jobId*/
        2U,                /*jobPriority*/
    },
    {
        CsmJob_RandomSyn,        /*jobId*/
        2U,                /*jobPriority*/
    },
    {
        CsmJob_SigGen,        /*jobId*/
        3U,                /*jobPriority*/
    },
    {
        CsmJob_SigVeri,        /*jobId*/
        4U,                /*jobPriority*/
    },
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
/*******************************************************************************
**                      Global Variable Definitions                          **
*******************************************************************************/
#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
CONST(Csm_JobsCfgType, CSM_CONST) Csm_JobCfg[CSM_JOB_NUM] =
{
    {
        &(Csm_JobPrimitiveInfo[CsmJob_HashSyn]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_HashSyn]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
    {
        &(Csm_JobPrimitiveInfo[CsmJob_HashASyn]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_HashASyn]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
    {
        &(Csm_JobPrimitiveInfo[CsmJob_EncryptAsyn]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_EncryptAsyn]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
    {
        &(Csm_JobPrimitiveInfo[CsmJob_DecryptAsyn]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_DecryptAsyn]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
    {
        &(Csm_JobPrimitiveInfo[CsmJob_MacGenAsyn]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_MacGenAsyn]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
    {
        &(Csm_JobPrimitiveInfo[CsmJob_MacVerifyAsyn]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_MacVerifyAsyn]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
    {
        &(Csm_JobPrimitiveInfo[CsmJob_RandomAsyn]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_RandomAsyn]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
    {
        &(Csm_JobPrimitiveInfo[CsmJob_EncryptSyn]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_EncryptSyn]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
    {
        &(Csm_JobPrimitiveInfo[CsmJob_DecryptSyn]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_DecryptSyn]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
    {
        &(Csm_JobPrimitiveInfo[CsmJob_MacGenSyn]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_MacGenSyn]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
    {
        &(Csm_JobPrimitiveInfo[CsmJob_MacVerifySyn]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_MacVerifySyn]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
    {
        &(Csm_JobPrimitiveInfo[CsmJob_RandomSyn]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_RandomSyn]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
    {
        &(Csm_JobPrimitiveInfo[CsmJob_SigGen]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_SigGen]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
    {
        &(Csm_JobPrimitiveInfo[CsmJob_SigVeri]),    /*jobPrimitiveInfo*/
        &(Csm_JobInfo[CsmJob_SigVeri]),            /*jobInfo*/
        NULL_PTR,                                /*inOutRedirtRef*/
        0U,    /*queRef*/
        FALSE,                                    /*usePort*/
    },
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"

#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
CONST(Csm_QueueCfgType, CSM_CONST) Csm_QueCfg[CSM_QUEUE_NUM] = /* PRQA S 1531 */ /* MISRA Rule 8.7 */
{
    {
        5U,    /*queueSize*/
        0U,    /*cryIfChRef*/
    },
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"

#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
CONST(Csm_KeyCfgType, CSM_CONST) Csm_KeyCfg[CSM_KEY_NUM] = /* PRQA S 1531 */ /* MISRA Rule 8.7 */
{
    {
        0U,        /*cryIfKey*/
        FALSE,/*usePort*/
    },
    {
        1U,        /*cryIfKey*/
        FALSE,/*usePort*/
    },
    {
        2U,        /*cryIfKey*/
        FALSE,/*usePort*/
    },
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"

#define CSM_START_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"
CONST(Csm_JobCbkCfgType, CSM_CONST) Csm_CbkCfg[CSM_CBKFUNCS_NUM] =
{
};
#define CSM_STOP_SEC_CONST_UNSPECIFIED
#include "Csm_MemMap.h"

